package cultu.customer.service;

import java.util.List;

import org.granite.messaging.service.annotations.RemoteDestination;

import cultu.core.message.Context;
import cultu.customer.message.Customer;
import cultu.customer.message.CustomerCriteria;
import cultu.customer.message.CustomerList;
import cultu.customer.message.CustomerScenario;

/**
 * The Interface CustomerManager.
 */
@RemoteDestination(id="customerManager", channel="my-amf")
public interface CustomerManager {

  /**
   * Get customer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pKey the key.
   * @return the customer
   */
  Customer getCustomer (Context pContext, CustomerScenario pScenario, Customer pKey);

  /**
   * Create the customer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pCustomer the customer.
   * @return the customer
   */
  Customer createCustomer (Context pContext, CustomerScenario pScenario, Customer pCustomer);

  /**
   * Delete the customer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pKey the key.
   * @return the customer
   */
  Customer deleteCustomer (Context pContext, CustomerScenario pScenario, Customer pKey);

  /**
   * Updates the customer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pCustomer the customer.
   * @return the customer
   */
  Customer updateCustomer (Context pContext, CustomerScenario pScenario, Customer pCustomer);

  /**
   * Find the customers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pCriteria the criteria.
   * @return the customer list
   */
  CustomerList findCustomers (Context pContext, CustomerScenario pScenario, CustomerCriteria pCriteria);

  /**
   * Delete the customers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the customer list.
   * @return the customer list
   */
  CustomerList deleteCustomers (Context pContext, CustomerScenario pScenario, CustomerList pList);

  /**
   * Create customers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the customer list.
   * @return the customer list
   */
  CustomerList createCustomers (Context pContext, CustomerScenario pScenario, CustomerList pList);

  /**
   * Updates customers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the customer list.
   * @return the customer list
   */
  CustomerList updateCustomers (Context pContext, CustomerScenario pScenario, CustomerList pList);
  
  /**
   * increaseScore
   * @param customerId
   * @param communitiesId
   * @param increase
   */
  public void increaseScore(final Long customerId, List<Long> communitiesId, final Integer increase);
}
